1. Field of the Invention
The present invention relates to a reference voltage generating circuit and an analog circuit using the same, particularly to a reference voltage generating circuit which is capable of selecting an output voltage, and an analog circuit using the same.
2. Description of the Related Art
FIG. 8 is a circuit diagram showing a conventional reference voltage generating circuit and a constant current circuit.
Resistances R4, R3, R2, R1, and R0 are connected in series between a power supply for a reference voltage V101 and a ground potential GND in a reference voltage generating circuit 101. For example, each of the resistances R0, R1, R2, and R3 is constituted of one unit resistance, and the resistance R4 is constituted of six unit resistances connected in series.
A selector 3 selects one of voltages of terminals N1, N2, N3, and N4 arranged between the adjacent resistances R0 to R4, and outputs the selected voltage as one of reference voltages REF1, REF2, REF3, and REF4. The selector 3 is, for example, disclosed in Japanese Patent No. 3253901.
A comparison circuit 7 is provided in a constant current circuit 5. A reference voltage from the reference voltage generating circuit 101 is connected to a non-inverting input terminal of the comparison circuit 7. An output terminal of the comparison circuit 7 is connected to a gate of an output transistor Tr. A drain of the output transistor Tr is connected to a power supply V2. A source of the output transistor Tr is connected to a ground potential GND via a resistance RA. A terminal A between the output transistor Tr and the resistance RA is connected to an inverting input terminal of the comparison circuit 7. In the constant current circuit 5, an output current I can be changed in accordance with the reference voltages REF1 to REF4 selected by the selector 3.
When a semiconductor device is mass-produced, a differential offset of the comparison circuit and a variation in resistance are unavoidable problems. In the circuit shown in FIG. 8, the comparison circuit 7 has a differential offset α, and the resistance RA has a variation in resistance β (magnification of an actual resistance value to a designed resistance value). A voltage value of the power supply for the reference voltage V101 of the reference voltage generating circuit 101 is adjusted, and thereby values of the reference voltages REF4, REF3, REF2, and REF1 are adjusted, and then the output current I in the constant current circuit 5 is adjusted.
Table 1 shows an example of a result of adjusting the output current I of the constant current circuit 5 by adjusting the voltage value of the power supply for the reference voltage V101 in the reference voltage generating circuit 101 and the constant current circuit 5 shown in FIG. 8. Here, in a case where the differential offset α of the comparison circuit 7 is 10 mV (millivolt), and the variation in resistance β of the resistance RA is 1.1, the voltage value of the power supply for the reference voltage V101 is adjusted so that the output current I is 0.1 mA (milliampere) when the reference voltage REF1 is selected by the selector 3.
TABLE 1EACH OF REF OUTPUTAND INTENDED VALUEBEFORE TRIMMINGREFINTENDED VALUE OFREFERENCENUMBER OFVOLTAGECURRENTOUTPUTCURRENT [mA]VOLTAGE [V]RESISTANCES[V][mA]——6——REF40.410.4000.355REF30.31.00010.3000.264REF20.210.2000.173REF10.110.1000.082EACH OF REFOUTPUT ANDINTENDED VALUEINTENDEDVALUE OFAFTER TRIMMINGREFCURRENTREFERENCENUMBER OFVOLTAGECURRENTERROROUTPUT[mA]VOLTAGE [V]RESISTANCES[V][mA][mA]——6.00———REF40.41.000.4800.4270.027REF30.31.2001.000.3600.3180.018REF20.21.000.2400.2090.009REF10.11.000.1200.1000.000
An intended adjustment has been performed in REF1 in which the output current I is set so as to be 0.1 mA. However, there is a problem in that an error between an output current value and the intended value increases, as the output current I increases; that is, a value of the output current I diverges away from the output current value (0.1 mA) of an adjustment target.